package com.kriss.crm.biz.impl;

import com.kriss.crm.base.BaseBizImpl;
import com.kriss.crm.biz.IUserBiz;
import com.kriss.crm.dao.IUserDao;
import com.kriss.crm.entity.User;

public class UserBizImpl extends BaseBizImpl implements IUserBiz {

	private IUserDao userDao;

	public User login(User user) {
		User temp = null;
		String hql = "from User where logName = ? and userPass = ?";

		try {
			temp = userDao.findOneByHql(hql, user.getLogName(), user
					.getUserPass());
		} catch (Exception e) {
			e.printStackTrace();
		}
		return temp;
	}

	public IUserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

}
